-- GENERATED SPELL FOR [Ashlan Stonesmirk] --


function spell0_1073(pUnit, Event) --@Coarse Dynamite,n/a--
pUnit:FullCastSpellOnTarget(9002,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1073', 1000, 1)
end

function spell1_1073(pUnit, Event) --@Coarse Dynamite,n/a--
pUnit:FullCastSpellOnTarget(9003,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1073', 1000, 1)
end

function spell2_1073(pUnit, Event) --@Coarse Dynamite,n/a--
pUnit:FullCastSpellOnTarget(9004,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1073', 1000, 1)
end

function spell3_1073(pUnit, Event) --@Coarse Dynamite,n/a--
pUnit:FullCastSpellOnTarget(9009,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1073', 575, 1)
end

function Sorts_1073(pUnit, Event)
local choix_sorts_1073 = math.random(0, 3)
if choix_sorts_1073 == 0 then
pUnit:RegisterEvent('spell0_1073', 1, 1)
end
if choix_sorts_1073 == 1 then
pUnit:RegisterEvent('spell1_1073', 1, 1)
end
if choix_sorts_1073 == 2 then
pUnit:RegisterEvent('spell2_1073', 1, 1)
end
if choix_sorts_1073 == 3 then
pUnit:RegisterEvent('spell3_1073', 1, 1)
end
end

function mob1073_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1073', math.random(1500, 3000), 1)
end

function mob1073_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1073_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1073_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1073, 1, 'mob1073_Action')
RegisterUnitEvent(1073, 2, 'mob1073_Leave')
RegisterUnitEvent(1073, 3, 'mob1073_Kill')
RegisterUnitEvent(1073, 4, 'mob1073_Die')
